﻿<script src="/Scripts/jquery-1.4.4.min.js" type="text/javascript"></script>
<script src="/Scripts/jquery.unobtrusive-ajax.js" type="text/javascript"></script>

@{
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <title>t1</title>
</head>

<script>
    function a() {
//        alert(1);
//        setTimeout(a,1000);
    }

    function b() {
        //alert(2);
    }
</script>

<body>
    <div>
        222
    </div>
    <div id='up'>
    </div>
    <div id='up1'>
    </div>
    @Ajax.ActionLink(
    "hi",
    "Details",
    //new { id = 5 },
    new AjaxOptions()
    {
        UpdateTargetId = "up",
        HttpMethod = "post",
        OnBegin="a();",
        OnSuccess="b();",
    }
    )
    <br />
    @Ajax.ActionLink(
    "hi2",
    "Details",

    new AjaxOptions()
    {
        HttpMethod = "post",
        UpdateTargetId = "content",

    }
    )
    @* @{
        Html.RenderPartial("t3");
    }*@
    <input type="text" />
</body>
</html>
